package com.zjitc.book.mapper;

import com.zjitc.book.dto.UserDto;
import com.zjitc.book.entity.Permissions;
import com.zjitc.book.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {

    @Select("select * from  user where username=#{username}")
    public User getUserByUsername(@Param("username") String username);
    @Insert("insert into user (username,password) values (#{username},#{password})")
    public void insertUser(UserDto user);

    public List<String> getPermissionByUsername(@Param("username")String username);

    public List<Permissions> getMenu(@Param("username") String username);
}
